<div class="view" <?php if(($index+1)%3 == 0){echo 'style="margin-right:0px;"';} ?>>
    <?php echo CHtml::link(CHtml::image($data->thumbnail,$data->title),Yii::app()->createUrl('shop/view',array('id'=>$data->id)),array('title'=>$data->title)); ?>
    <?php echo '<h2>'.CHtml::link(CHtml::encode($data->title),Yii::app()->createUrl('shop/view',array('id'=>$data->id))).'</h2>'; ?>
    <?php echo '<h3>£'.$data->price.'</h3>'; ?>
</div>